import { defineConfig } from 'vite';
import { resolve } from 'path';

import vue from '@vitejs/plugin-vue';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  base: './',
  build: {
    rollupOptions: {
      input: {
        // 配置所有页面路径，使得所有页面都会被打包
        main: resolve(__dirname, 'index.html'),
        digitalTeachingMaterial: resolve(__dirname, 'pages/digitalTeachingMaterial/index.html'),
        test: resolve(__dirname, 'pages/test/index.html'),
        iconfont: 'public/icon/iconfont.js',
      },
    },
  },
});
